package com.its.feign.server.domain.d2.web;

import com.its.common.model.WebResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author xiaxp
 * @Date 1/5/22 17:51
 * @Description
 */
@Controller
@RequestMapping("/test")
@Slf4j
public class TestController {

    private AtomicInteger idx = new AtomicInteger(0);

    @GetMapping(value = "get")
    @ResponseBody
    public WebResult get() {
        return WebResult.success().put("data", idx.incrementAndGet());
    }
}
